//
//  LPGainPath.h
//  LovingPartyBuilding
//
//  Created by 刘应平 on 17/5/17.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Photos/Photos.h>

typedef void(^Result)(NSData *fileData, NSString *fileName);
@interface LPGainPath : NSObject
//PHFetchResult *fetchResult = [PHAsset fetchAssetsWithALAssetURLs:@[url] options:nil];
//PHAsset *asset = fetchResult.firstObject;
/**  获取图片文件路径  */
+ (void)getImageFromPHAsset:(PHAsset *)asset Complete:(Result)result;
/**  获取视频文件路径  */
+ (void)getVideoFromPHAsset:(PHAsset *)asset Complete:(Result)result;
/**  获取图片文件路径  */
+ (void)getImageNameFromImageUrl:(NSURL *)imageUrl Complete:(Result)result;

/*
 
 NSURL *url = [info objectForKey:@"UIImagePickerControllerReferenceURL"];
 PHFetchResult *fetchResult = [PHAsset fetchAssetsWithALAssetURLs:@[url] options:nil];
 PHAsset *asset = fetchResult.firstObject;
 
 */
@end
